package com.apes.framework.plugin.form.parser.matcher;

import com.alibaba.fastjson.JSON;

/**
 * 功能：
 *
 * @author xul
 * @create 2018-07-17 10:27
 */
public class DomainMatcher implements Matcher<String, String> {

    private Matcher parent;

    /**
     * 功能：获取识别模式
     */
    @Override
    public String getRegex() {
        return null;
    }

    @Override
    public Matcher getParent() {
        return parent;
    }

    @Override
    public void setParent(Matcher parent) {
        this.parent = parent;
    }

    /**
     * 功能：元素解析
     *
     * @param element
     */
    @Override
    public String parse(String element) {
        PolishMatcher polishMatcher = new PolishMatcher();
        polishMatcher.setParent(this);
        return JSON.toJSONString(polishMatcher.parse(element));
    }
}
